require 'net/http'
require 'uri'

def puts_response_header url = 'https://totemlife.cn'
    uri = URI.parse(url)

    # 设置要请求的URL
    # 使用Net::HTTP发起GET请求
    response = Net::HTTP.get_response(uri)

    # 打印返回的HTTP标头
    puts "HTTP Response Headers for [#{uri}]"
    response.each_header do |header, value|
      puts "#{header}: #{value}"
    end

    puts ""
end

puts_response_header 'https://totemlife.cn'
puts_response_header 'http://totemlife.cn'
